package com.uncp.comisiondeadmision.service;

import java.util.List;

import com.uncp.comisiondeadmision.dao.DAOFactory;
import com.uncp.comisiondeadmision.dao.IDCdp;
import com.uncp.comisiondeadmision.util.entity.ECdp;

public class SCdp implements ISCdp {

	private IDCdp cdpDAO;
	private DAOFactory fabrica = null;

	public SCdp(int i) {
		fabrica = DAOFactory.getDAOFactory(i);
		this.cdpDAO = fabrica.getCdp();
	}

	public ECdp buscarXPk(String cdp) throws Exception {

		return cdpDAO.buscarXPk(cdp);
	}

	public void insertarCDP(ECdp cdp) {

		cdpDAO.insertarCDP(cdp);
	}

	public List<ECdp> listarCDP() throws Exception {

		return cdpDAO.listarCDP();
	}

}
